<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script src="../js/vue.js"></script>
		<div id="app">
			<div id="">
				<cpn></cpn>
			</div>
		</div>
		<template id="cpn">
			<button @click="btnClick">按钮</button>
		</template>
		<script>
			var app = new Vue({
				el: '#app',
				data: {
					name:"123123",
				},
				methods: {

				},
				components:{
					cpn:{
						template:"#cpn",
					methods:{
						btnClick(){
							console.log(this.$parent.name)
						}
					}	
					}
				}
			})
		</script>
	</body>
</html>
